//app.js
App({
  data:{
    //url: "https://www.xxcamanage.cn",
    url:"http://localhost:8080",
    platFormUrl:"http://10.90.90.175:8080/platform-service",
    picRoot:"https://",
    //picRoot:"http://111.229.48.117"
  },
  globalData:{
    openId:"",
    pageType:0
  },
  onLaunch: function () {
    let _that = this;
    wx.getStorage({
      key: "openId",
      success(res) {
        _that.globalData.openId = res.data
      }
    })
    wx.getStorage({
      key: "pageType",
      success(res) {
        _that.globalData.pageType = res.data
      }
    })
  },
  formatDate:function(value){
    var time = getDate(value);
    　　var year = time.getFullYear();
    　　var month = time.getMonth() + 1;
    　　var date = time.getDate();
    　　var hour = time.getHours();
    　　var minute = time.getMinutes();
    　　var second = time.getSeconds();
    　　month = month < 10 ? "0" + month : month;
    　　date = date < 10 ? "0" + date : date;
    　　hour = hour < 10 ? "0" + hour : hour;
    　　minute = minute < 10 ? "0" + minute : minute;
    　　second = second < 10 ? "0" + second : second;
    　　return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
  }
})

